kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-pub/hnswlib
    REF "v${VERSION}"
    SHA512 f729d537b43dd130200f23efb9b50f79a8c697303cac633ec5b2923e65a05795e57600777721bd94367ec0399b887db9b9861ebac450c231caa98fbdfd46c76b
    HEAD_REF master
)

set(KMPKG_BUILD_TYPE "release") # header-only port

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DHNSWLIB_EXAMPLES=OFF
)

kmpkg_cmake_install()
kmpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/hnswlib)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")

kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
